# 
tup = (12,34,5,7,True,False,"lala")
# 获取元组的长度  len()
# print(len(tup))   # 7

tup1 = (11,23,6,7.32,345,61)
# 获取元组的最大值 max
# print(max(tup1))

# 获取元组的最小值 min
# print(min(tup1))

# tuple()  将其他数据类型转换为元组
list1 = [12,3,57,8,90]
# print(type(list1))   # <class 'list'>
# print(type(tuple(list1)))  # <class 'tuple'>


# 遍历元组中的元素
# 第一种方式:

tup2 = (145,5,75,3,True,False,"hehe")
'''
for i in tup2:
    print(i)

'''

# 第二种方式:
'''
for i in range(len(tup2)):
    print(tup2[i])
'''

# 第三种方式:   通过enumrate() 遍历索引和元素
for key,value in enumerate(tup2):
    print(key,value)
